Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for drift between .template files and generated files #13

Merged
merged 35 commits into from
Sep 19, 2024

Conversation

bas-ie
Copy link
Collaborator

@bas-ie bas-ie commented Sep 18, 2024

This:

  • runs generate and diffs the resulting files with a copy, looking for instances where a PR author might have changed a file without updating the corresponding template

edit: doesn't really close 5 :)

This approach should also work for bevy_quickstart, we just need to provide all the template placeholder values with https://cargo-generate.github.io/cargo-generate/templates/template_defined_placeholders.html#--define-or--d-flag.

Copy link
Collaborator

@benfrankel benfrankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial style pass

.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@benfrankel benfrankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name: suggestions aren't hard suggestions. If you have a better idea for them then that's good too.

.github/workflows/ci-generate.yaml Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-generate.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@benfrankel benfrankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually just remembered another thing. We'll need to exclude ci-generate.yaml via cargo-generate.toml.

.github/workflows/ci-generate.yaml Show resolved Hide resolved
@bas-ie
Copy link
Collaborator Author

bas-ie commented Sep 19, 2024

Ooof. Roll on a really solid way to work with GHA locally, the constant iteration is annoying 😆

Copy link
Collaborator

@benfrankel benfrankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... it just takes so long.

@bas-ie bas-ie merged commit 7c14715 into main Sep 19, 2024
1 check passed
@bas-ie bas-ie deleted the 5-ci-generate branch September 19, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants